<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <title>重定向接口测试</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
        }

        .container {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .box {
            border: 1px solid #ddd;
            padding: 15px;
            border-radius: 5px;
        }

        button {
            padding: 10px 15px;
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            margin-right: 10px;
        }

        button:hover {
            background-color: #45a049;
        }

        pre {
            background-color: #f5f5f5;
            padding: 10px;
            border-radius: 4px;
            overflow-x: auto;
        }
    </style>
</head>
<body>
<h1>重定向接口测试</h1>
<script src="./index.js"></script>
<div class="container">
    <div class="box">
        <h2>使用XHR请求</h2>
        <p>点击按钮使用XMLHttpRequest请求重定向接口</p>
        <button id="xhrBtn">发送XHR请求</button>
        <div id="xhrResult"></div>
    </div>

    <div class="box">
        <h2>使用Fetch请求</h2>
        <p>点击按钮使用Fetch API请求重定向接口</p>
        <button id="fetchBtn">发送Fetch请求</button>
        <div id="fetchResult"></div>
    </div>
</div>

</body>
</html>